package com.miniapp.dto;

import com.miniapp.utils.BaseUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: linyuchi
 * Date: 2018/6/1
 * Time: 14:19
 * Description: No Description
 */
public class ExtJsonDTO {

    private boolean extEnable;
    private String extAppid;
    private boolean directCommit;
    private Map ext  ;
    private Map extPages;
    private Map window;
    private Map tabBar;
    private Map networkTimeout;

    public void addExt(String key,Object val){
        if (BaseUtils.isEmpty(ext)){
            ext = new HashMap();
        }
        ext.put(key,val);
    }
    public void addWindow(String key,Object val){
        if (BaseUtils.isEmpty(window)){
            window = new HashMap();
        }
        window.put(key,val);
    }
    public void addNetworkTimeout(String key,Object val){
        if (BaseUtils.isEmpty(networkTimeout)){
            networkTimeout = new HashMap();
        }
        networkTimeout.put(key,val);
    }

    public boolean isExtEnable() {
        return extEnable;
    }

    public void setExtEnable(boolean extEnable) {
        this.extEnable = extEnable;
    }

    public String getExtAppid() {
        return extAppid;
    }

    public void setExtAppid(String extAppid) {
        this.extAppid = extAppid;
    }

    public boolean isDirectCommit() {
        return directCommit;
    }

    public void setDirectCommit(boolean directCommit) {
        this.directCommit = directCommit;
    }

    public Map getExt() {
        return ext;
    }

    public void setExt(Map ext) {
        this.ext = ext;
    }

    public Map getExtPages() {
        return extPages;
    }

    public void setExtPages(Map extPages) {
        this.extPages = extPages;
    }

    public Map getWindow() {
        return window;
    }

    public void setWindow(Map window) {
        this.window = window;
    }

    public Map getTabBar() {
        return tabBar;
    }

    public void setTabBar(Map tabBar) {
        this.tabBar = tabBar;
    }

    public Map getNetworkTimeout() {
        return networkTimeout;
    }

    public void setNetworkTimeout(Map networkTimeout) {
        this.networkTimeout = networkTimeout;
    }
}
